package main

import (
	"fmt"
	"sync"
	"time"
)

func main(){
	var wg sync.WaitGroup
	for i:=0 ;i<10;i++{
		wg.Add(1)
		go func(i int){
			time.Sleep(time.Second)
			fmt.Println("group ",i)
			wg.Done()
		}(i)
	}

	wg.Wait()
	fmt.Println("exit...")
	}